package org.opens.service.impl;

import cn.hutool.core.lang.Assert;
import org.opens.dao.MyBatisPersonMapper;
import org.opens.entity.MyBatisPerson;
import org.opens.service.MyBatisPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service(value = "myBatisPersonService")
public class MyBatisPersonServiceImpl implements MyBatisPersonService {

    @Autowired
    private MyBatisPersonMapper myBatisPersonMapper;

    @Override
    public MyBatisPerson queryOneByPK(Integer id) {
        Assert.notNull(id, "查询id不能为null");
        return myBatisPersonMapper.selectById(id);
    }
}
